//	<ul class="nav2list" id="nav3list">
//		<li><a class="nav2active" href="#">工商信息</a></li>
//		<li><a href="#">投资融资</a></li>
//		<li><a href="#">高新企业</a></li>
//	</ul>
//控制三级菜单
	$(".nav2list").mouseover(function(that) {
		$(this).css({
			"height" : "auto"
		});
	})
	 
	$(".nav2list").mouseout(function(that) {
		$(this).css({
			"height" : "60px"
		});
	})
	function createLine(title,emotion,data){
		var name = title
		var em = emotion
		var emhtml =''
		if(em == undefined){
			emhtml =
				'			<div class="col-md-1 forum-info">'+
				'				<div class="feel">'+
				'					<small style="color:#46D59D">正面</small>'+
				'				</div>'+
				'				<span class="views-number" id="numb">'+
				'					1516'+
				'				</span>'+
				'			</div>'+
				'			<div class="col-md-1 forum-info"> '+
				'				<div class="feel">'+
				'					<small style="color:#FBBA3A">中性</small>'+
				'				</div>'+
				'				<span class="views-number" id="numb">'+
				'					238'+
				'				</span>'+
				'			</div>'+
				'			<div class="col-md-1 forum-info">'+
				'				<div class="feel">'+
				'					<small style="color:#F73D60">负面</small>'+
				'				</div>'+
				'				<span class="views-number" id="numb">'+
				'					180'+
				'				</span>'+
				'			</div>'
				
		}else{
			emhtml=''
		}
		console.log("title->",name)
		if (name == undefined){
			name = '数据统计'
		}	
		var html = 
			'<div class="ibox-content charts" style="background-color:white;">'+
			'	<div class="forum-item" style="border-bottom:0">'+
			'		<div class="row">'+
			'			<div class="col-md-9" style="width:74%">'+
			'				<div class="forum-icon" style="margin-right:11px;margin-bottom:14px;margin-left:6px">'+
			'					<i class="fa fa-clock-o"></i>'+
			'				</div>'+
			'				<p class="forum-item-title">'+name+'·统计24小时内数据采集状态</p>'+
			'				<div class="forum-sub-title" style="margin-left:40px;margin-top:6px">数据采集总量: 17,800,600，更新时间 5分钟前</div>'+
			'			</div>'+
			emhtml+
			'		</div>'+
			'	</div>'+
			'	<div class="row" style="padding: 0 30px 0 10px;">'+
			'		<div id="container" style="width: 100%; height: 250px;">'+
			'		</div>'+
			'	</div>'+
			'</div>'
			$("#dataInfoLine").append(html)
			createTu(data)
}
	
function createTu(data) {
	anychart.onDocumentReady(function() {
		var dataSet = anychart.data.set(data);
		var chart = anychart.line();
		chart.animation(true);
		chart.padding([ 10, 20, 5, 20 ]);
		chart.xAxis().labels().padding(5);
		chart.crosshair().enabled(true).yLabel(false).yStroke(null);
		chart.tooltip().positionMode('point');
		chart.title('统计14天每日数据采集状态走势');
		var seriesData_1 = dataSet.mapAs({
			'x' : 0,
			'value' : 1
		});
		var series_1 = chart.line(seriesData_1);
		series_1.name('日采集数量');
		series_1.hovered().markers().enabled(true).type('circle').size(
				4);
		series_1.tooltip().position('right').anchor('left-center')
				.offsetX(5).offsetY(5);
		chart.legend().enabled(true).fontSize(13).padding(
				[ 0, 0, 10, 0 ]);
		chart.container('container');
		chart.draw();

		$('.anychart-credits').remove()
	});

	function getData() {
		
		
		return [[ '2-10', 17.5 ], [ '2-11', 18.9 ], [ '2-12', 20.8 ],
			[ '2-13', 22.9 ], [ '2-14', 25.2 ], [ '2-15', 27.0 ],
			[ '2-16', 26.5 ], [ '2-17', 25.3 ], [ '2-18', 23.4 ],
			[ '2-19', 19.5 ], [ '2-20', 17.8 ], [ '2-21', 16.2 ],
			[ '2-22', 15.4 ], [ '2-23', 14.0 ], [ '2-24', 12.5 ],
			[ '2-25', 10.8 ], [ '2-26', 8.9 ], [ '2-27', 18.0 ],
			[ '2-28', 6.2 ] ]
	}
}

function createbar(id,name,data){
    anychart.onDocumentReady(function () {
        // create column chart
        var chart = anychart.column();
    
        // turn on chart animation
        chart.animation(true);
    
        // set chart title text settings
        chart.title(name);
    
        // create area series with passed data
        var series = chart.column(data);
//        	[
//            ['Rouge', '80540'],
//            ['Foundation', '94190'],
//            ['Mascara', '102610'],
//            ['Lip gloss', '110430'],
//            ['Lipstick', '128000'],
//            ['Nail polish', '143760'],
//            ['Eyebrow pencil', '170670'],
//            ['Eyeliner', '213210'],
//            ['Eyeshadows', '249980']
//        ]);
    
        // set series tooltip settings
        series.tooltip().titleFormat('{%X}');
    
        series.tooltip()
                .position('center-top')
                .anchor('center-bottom')
                .offsetX(0)
                .offsetY(5)
                .format('{%Value}{groupsSeparator: }');
    
        // set scale minimum
        chart.yScale().minimum(0);
    
        // set yAxis labels formatter
        chart.yAxis().labels().format('{%Value}{groupsSeparator: }');
    
        // tooltips position and interactivity settings
//        chart.tooltip().positionMode('point');
//        chart.interactivity().hoverMode('by-x');
    
        // axes titles
//        chart.xAxis().title('Product');
//        chart.yAxis().title('Revenue');
    
        // set container id for the chart
        chart.container(id);
    
        // initiate chart drawing
        chart.draw();
    });
    
}
setTimeout(() => {
	$(".anychart-credits").hide()
}, 100);
	
function hastu(imgurl,source,title,content,websname,key,time) {
//	console.log(imgurl)
	if(source == undefined || title == undefined || content == undefined || websname == undefined || time == undefined || imgurl == undefined ||time == undefined){
		websname = "/img/menhu/1.jpg";
		source = "----";
		title = "----";
		content = "----";
		websname = "----";
		key = "----";
		time = "----";
		}

	//判断链接是否请求success
		var ImgObj = new Image();
		ImgObj.src = imgurl;
		if(ImgObj.fileSize > 0 || (ImgObj.width > 0 && ImgObj.height > 0)) {
//			console.log("有效")
		} else {
//			console.log("无效")
			imgurl = "/spider-factory/img/badimg.png"
		}
	 
	var html =
	"<div class='custom-article b-b'>"+
    "    <div class='article-search-result'>"+
    "        <div class='article-imgbox'>"+
    "           <img style='width: 190px;' src='"+imgurl+"'>"+
    "        </div>"+
    "        <div class='article-content'>"+
    "        	<div class='article-content-title'>"+
    "          		<a href='" +source+ "' target='_blank'>"+title+"</a>"+
    "            </div>"+
    "            <div class='article-content-con'>"+content+"</div>"+
    "        </div>"+
    "    </div>"+
    "    <div class='article-content-tips'>"+
    "        	<div class='article-source'><i class='fa fa-globe'></i>来源网站："+websname+"</div>"+
    "    		<div class='article-keywords'><i class='fa fa-tags'></i>关键词："+key.join('，')+"</div>"+
    "           <div class='article-time'><i class='fa fa-clock-o'></i>时间："+time+"</div>"+
    "    </div>"+
    "</div>"
    return html
}
function notu(source,title,content,websname,key,time) {
	if(source == undefined || title == undefined || content == undefined || websname == undefined||key == undefined ||time == undefined){
	source = "----";
	title = "----";
	content = "----";
	websname = "----";
	key="----";
	time = "----";
	}
		var html = 
		'<div class="custom-article b-b"> '+
		'    <div class="article-content p-l-0">'+
		'    	<div class="article-content-title">'+
		'      		<a target="_blank" href="'+source+'">'+title+'</a>'+
		'        </div>'+
		'        <div class="article-content-con">'+content+'</div>'+
		'        <div class="article-content-tips m-t-0">'+
	    '        	<div class="article-source"><i class="fa fa-globe"></i>来源网站：'+websname+'</div>'+
	    "    		<div class='article-keywords'><i class='fa fa-tags'></i>关键词："+key.join('，')+"</div>"+
	    '            <div class="article-time"><i class="fa fa-clock-o"></i>时间：'+time+'</div>'+
	    '    	</div>'+
		'    </div>'+
		'</div>	' 
		return html
}

function nodata(id){
	var html=
		'<div class="nodata-imgbox">'+
		'<img alt="暂无数据" src="/spider-factory/img/nodata.png">'+
//		'<p>暂无数据</p>'+
		'</div>'
	$(id).html(html)
}





